package D3;

public class CompareByData {
    public static int compare(Student o1,Student o2){
        return o1.getAge()-o2.getAge();//升序排序的规则
        //实例方法引用

    }
    public int compareable(Student o1,Student o2){
        return o2.getAge() - o1.getAge();//降序排序的规则
    }
}
